package cn.li.org.domain;

import cn.li.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data//编译时自动生成getter setter
public class Department extends BaseDomain {
    private String sn;
    private String name;
    @ApiModelProperty("部门上级层级目录")
    private String dirPath;
    private Integer state;
    private Long manager_id;
    private Employee manager;
    private Long parent_id;
    private Department parent;
    //当前部门对应的儿子可以做到无限极
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    List<Department> children = new ArrayList<>();
}
